using Epitech.Krisk.Xna.ScreenManagerLib.ScreenManager;
using Epitech.Krisk.Xna.UI.Game.Menu;
using Epitech.Krisk.Xna.UI.Game;
using Epitech.Krisk.Xna.UI.Game.Menu.Intro;
using Epitech.Krisk.Xna.UI.Game.Utils;
using Microsoft.Xna.Framework;

namespace Epitech.Krisk.Xna.UI.Game
{
    /// <summary>
    /// This is the main type for your game
    /// </summary>
    public class Game1 : Microsoft.Xna.Framework.Game
    {
        public GraphicsDeviceManager Graphics { get; set; }

        readonly ScreenManager _screenManager;

        public Game1()
        {
            Graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            Graphics.PreferredBackBufferWidth = 1680;
            Graphics.PreferredBackBufferHeight = 1050;
            Graphics.IsFullScreen = true;
            IsMouseVisible = true;

            _screenManager = ScreenManager.Instance(this, "Font/defaultfont", true);

            Components.Add(_screenManager);

            Music.GetInstance(_screenManager, "Music/IntroMusic");
            Sound.GetInstance(_screenManager, "Music/ButtonSound");

            _screenManager.AddScreen(new Intro(), null);
        }

        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);

            // TODO: Add your drawing code here

            base.Draw(gameTime);
        }
    }
}
